#ifndef _BEEP_H_
#define _BEEP_H_


#include "include/ca51f003_config.h"		
#include "include/ca51f003sfr.h"
#include "include/ca51f003xsfr.h"
#include "include/gpiodef_f003.h"

//BZCON
#define BZD(N)		(N<<2)
#define BZH(N)		(N<<1)
#define BZE(N)		(N<<0)

#define BZDIV_V		(16000000/1000)			//buzzer频率为1KHZ
#define BZDUT_V		(BZDIV_V/3)				//占空比为50%

#define BEEP_ON    BZCON ^= (BZH(1) | BZE(1));
#define BEEP_OFF   BZCON ^= (BZH(1) |  BZE(1));


void Beep_Init(void);
#endif
